/**
 * Created by LeungZ on 2016/3/22.
 */
class UserSrv {
    constructor(commonSrv) {
        "ngInject";
        this._commonSrv = commonSrv;
        this.users = {root: 'root'};
    }

    login(para) {
        return this._commonSrv('form', '/ctg-imageconsole-web/login', {
            username: para.username,
            password: para.password
        });
    }

    logOut(){
        return this._commonSrv('get', '/ctg-imageconsole-web/logout');
    }

    getUserInfo(){
        return this._commonSrv('get', '/ctg-imageconsole-web/permission/user')
    }

    getMenu(){
        return this._commonSrv('get','/ctg-imageconsole-web/permission/menu_tree');
        // return this._commonSrv('get','http://localhost:33001/src/services/menus.json');
    }
}
export default UserSrv